namespace CaltechSoft.Service.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class addUpdater : DbMigration
    {
        public override void Up()
        {
            DropColumn("dbo.Poes", "UpdatedBy");
            DropColumn("dbo.Quotes", "UpdatedBy");
            DropColumn("dbo.WorkOrders", "UpdatedBy");
            RenameColumn(table: "dbo.Poes", name: "SalesmanId", newName: "UpdatedBy");
            RenameColumn(table: "dbo.Quotes", name: "SalesmanId", newName: "UpdatedBy");
            RenameColumn(table: "dbo.WorkOrders", name: "SalesmanId", newName: "UpdatedBy");
            RenameIndex(table: "dbo.Poes", name: "IX_SalesmanId", newName: "IX_UpdatedBy");
            RenameIndex(table: "dbo.Quotes", name: "IX_SalesmanId", newName: "IX_UpdatedBy");
            RenameIndex(table: "dbo.WorkOrders", name: "IX_SalesmanId", newName: "IX_UpdatedBy");
        }
        
        public override void Down()
        {
            RenameIndex(table: "dbo.WorkOrders", name: "IX_UpdatedBy", newName: "IX_SalesmanId");
            RenameIndex(table: "dbo.Quotes", name: "IX_UpdatedBy", newName: "IX_SalesmanId");
            RenameIndex(table: "dbo.Poes", name: "IX_UpdatedBy", newName: "IX_SalesmanId");
            RenameColumn(table: "dbo.WorkOrders", name: "UpdatedBy", newName: "SalesmanId");
            RenameColumn(table: "dbo.Quotes", name: "UpdatedBy", newName: "SalesmanId");
            RenameColumn(table: "dbo.Poes", name: "UpdatedBy", newName: "SalesmanId");
            AddColumn("dbo.WorkOrders", "UpdatedBy", c => c.String());
            AddColumn("dbo.Quotes", "UpdatedBy", c => c.String());
            AddColumn("dbo.Poes", "UpdatedBy", c => c.String());
        }
    }
}
